package zl.Entity;

import javax.persistence.*;

@Entity
@Table(name = "tb_animal")
public class Animal {

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Animal(){

    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    Long id;

    @Column(length = 20)
    String name;

    @Column(length = 10)
    int  age;

    @Column(length = 20)
    String sex;

    @Column(length = 20)
    String species;

    @Column(length = 100)
    String introduction;

    public String getAId() {
        return AId;
    }

    public void setAId(String AId) {
        this.AId = AId;
    }

    @Column(length = 20)
    String AId;

    @Override
    public String toString() {
        return "Animal{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", species='" + species + '\'' +
                ", introduction='" + introduction + '\'' +
                ", AId='" + AId + '\'' +
                '}';
    }
}
